package com.qax.task.cron.processor;

/**
 * 处理器抽象
 * @author leiliang
 */
public interface Processor<_result>{

    /**
     * Core processor method
     */
    void doBeforeProcess();


    /**
     * Final execution method,Is also the final method called
     */
    default _result doProcessing(){
        this.doBeforeProcess();
        return exec();
    }


    /**
     * Actual exec do in ....
     * @return
     */
    _result exec ();
}
